package com.xiamaliu.dynamic;

public class DynamicTest {
    public static void main(String[] args) {
        ZhangLaosan zhangLaosan = new ZhangLaosan(new ZhangSan());
        zhangLaosan.findLove();

        JdkMeipo iPerson = new JdkMeipo();
        IPerson zhaoliu = iPerson.getInstance(new ZhaoLiu());
        zhaoliu.findLove();

        IPerson zhangsan = iPerson.getInstance(new ZhangSan());
        zhangsan.findLove();
    }
}
